import pymysql

conn = pymysql.connect(host="211.103.136.244", port=7061,
                       user="student", password="iHRM_student_2021",
                       database="test_db", charset="utf8")
cs = conn.cursor()
res = cs.execute("update t_book set `read`= 4 where title = '好好学接';")
print("影响的行数", res)
conn.commit()
conn.rollback()
cs.close()
conn.close()
